package com.itheima.test01;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/*
题目一：请使用字节流复制一个文件，一次读、写一个字节。
 */
public class Test01 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("D:\\IdeaProjects\\studentManagerSystem\\homework0917\\src\\com\\itheima\\test01\\Test01.java");
        FileOutputStream fos = new FileOutputStream("D:\\IdeaProjects\\studentManagerSystem\\homework0917\\Test01_copy.java");

        int b;
        while ((b = fis.read()) != -1){
            fos.write(b);
        }
        fis.close();
        fos.close();
    }
}
